# Maintainer: Thore Bödecker <foxxx0@archlinux.org>
# Contributor: Donald Webster <fryfrog@gmail.com>
pkgname='python-logutils'
_pkgbase="${pkgname#python-}"
pkgver=0.3.5
pkgrel=12
pkgdesc='Python module to parse metadata in video files.'
arch=('any')
url='https://bitbucket.org/vinay.sajip/logutils/'
license=('LGPL')
depends=('python')
makedepends=('python-setuptools')
source=("https://pypi.python.org/packages/source/l/logutils/logutils-${pkgver}.tar.gz")
sha512sums=('0194bf4f01e7a29d4211495dc5fead9d4bd5bc1b791d25ff38ad28960a229a9bcdbaa7e6d3b5a4105eef6c9aa159459d6529c2615df113e7ec1ae93aac5cce6c')

check() {
  cd "${srcdir}/${_pkgbase}-${pkgver}"
  # redis tests want to spin up a redis-server, undesired for downstream packaging
  rm -v ./tests/test_redis.py
  python -m unittest discover -vs ./tests
}

package() {
  cd "${srcdir}/${_pkgbase}-${pkgver}"
  python ./setup.py install --root="$pkgdir/" --optimize=1
}
